package com.okbihuo.perm.component.file.service.impl;


import com.okbihuo.perm.component.file.domain.ComFileContent;
import com.okbihuo.perm.component.file.mapper.ComFileContentMapper;
import com.okbihuo.perm.component.file.service.ComFileContentService;
import com.okbihuo.perm.core.mp.base.MyServiceImpl;
import com.okbihuo.perm.modules.rwb.wxOpen.utils.chiper.MD5;
import org.springframework.stereotype.Service;

/**
 * 文件接口实现层
 * @author stt
 */
@Service
public class ComFileContentServiceImpl extends MyServiceImpl<ComFileContentMapper, ComFileContent> implements ComFileContentService {

    @Override
    public ComFileContent createNewFileContent(String filename, byte[] pictureData) {
        // 使用md5验证图片是否已经验证
        String md5 = MD5.getMD5ofStr(pictureData);
        return ComFileContent.create(filename, md5, pictureData);
    }


}
